﻿//    Copyright 2014 LuoZhihui
//    Licensed under the Apache License, Version 2.0 (the "License");
//    you may not use this file except in compliance with the License.
//    You may obtain a copy of the License at
//      http://www.apache.org/licenses/LICENSE-2.0
//    Unless required by applicable law or agreed to in writing, software
//    distributed under the License is distributed on an "AS IS" BASIS,
//    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
//    See the License for the specific language governing permissions and
//    limitations under the License.

#region  导入名称空间

using System;
using System.ComponentModel.DataAnnotations;
using LotteryEngine.Infrastructure.Domain;

#endregion

namespace LotteryEngine.Model
{
	/// <summary>
	///     奖项设置
	/// </summary>
	public class Config : EntityBase<long>, IAggregateRoot
	{
		/// <summary>
		///     轮空项
		/// </summary>
		[Required]
		public virtual bool IsByeItem { get; set; }


		/// <summary>
		///     奖品数量
		/// </summary>
		[Required]
		public virtual long LotteryCount { get; set; }


		/// <summary>
		///     剩余数量
		/// </summary>
		[Required]
		public virtual long PrizeBlance { get; set; }


		/// <summary>
		///     开始时间
		/// </summary>
		[Required]
		public virtual DateTime StartDate { get; set; }


		/// <summary>
		///     结束时间
		/// </summary>
		[Required]
		public virtual DateTime EndDate { get; set; }


		/// <summary>
		///     概率系数
		/// </summary>
		[Required]
		public virtual double OddsCoefficient { get; set; }


		/// <summary>
		///     均衡值
		/// </summary>
		public virtual double Proportion { get; set; }


		/// <summary>
		///     中奖概率
		/// </summary>
		public virtual double Probability { get; set; }


		/// <summary>
		///     是否启用此奖项配置
		/// </summary>
		[Required]
		public virtual bool IsActived { get; set; }


		/// <summary>
		///     所属抽奖活动
		/// </summary>
		public virtual Sweepstake Sweepstake { get; set; }


		/// <summary>
		///     奖项
		/// </summary>
		public virtual Prize Prize { get; set; }
	}
}